﻿@model UserProfileModel
@using RielAp.Translation;

@{
    Layout = "~/Views/Shared/_ProfileLayout.cshtml";
    ViewBag.ProfileCurrentTab = ProfileViewType.UserProfile;
}


@if (!Html.ViewData.ModelState.IsValid)
        {
        <div class="alert alert-error">
            @foreach (var modelError in Html.ViewData.ModelState.SelectMany(keyValuePair => keyValuePair.Value.Errors))
            {
                <div>@modelError.ErrorMessage</div>
            }
        </div>
        }
                @using (Html.BeginForm("UserProfile", "Account", null, FormMethod.Post, new { @class = "form-horizontal", style = "width: 700px;  margin: auto;" }))
                {
                    <div class="control-group">
                        <label class="control-label" style="width:200px;" for="Phone">@Translation.RegisterPageEmailLabel</label>
                        <div class="controls" style="margin-left: 220px;">
                            @Html.TextBoxFor(m=>m.Email)
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" style="width:200px;" for="Phone">@Translation.RegisterPageUserNameLabel</label>
                        <div class="controls" style="margin-left: 220px;">
                            @Html.TextBoxFor(m=>m.UserName)
                        </div>
                    </div>
                    <div class="control-group">
                        <div class="controls" style="margin-left: 220px;">
                            <label class="checkbox inline">
                                @Html.CheckBoxFor(m => m.CanReceiveEmail) @Translation.RegisterPageCanReceiveMails
                            </label>
                        </div>
                    </div>
                    
                    <div class="control-group">
                        <div class="controls" style="margin-left: 220px;">
                            <input type="submit" class="btn btn-success" value="@Translation.CabinetSaveLabel"/>
                        </div>
                    </div>
            }

